package com.itheima.controller;

import com.itheima.service.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    /*注入service*/
// @Autowired//本地注入
 @Reference//远程注入
 private UserService userService;
@RequestMapping("/hello")
    public String sayHello(){
        return userService.hello();
    }
}
